package com.vmusic.data;

import java.util.Random;

/**
 * 制作数据父类
 *
 */
public class MakeData {
	// 随机
	public static Random r = new Random();
	
	/**
	 * 2012年随即月日时分秒
	 * @return
	 */
	public static String CreateDateTimeString() {
		String year = "2012";
		int monthI = r.nextInt(12) + 1;
		String month = monthI > 9 ? monthI + "" : "0" + monthI;
		int dayI = r.nextInt(28) + 1;
		String day = dayI > 9 ? dayI + "" : "0" + dayI;
		int hourI = r.nextInt(24);
		String hour = hourI > 9 ? hourI + "" : "0" + hourI;
		int minI = new Random().nextInt(60);
		String min = minI > 9 ? minI + "" : "0" + minI;
		int secI = new Random().nextInt(60);
		String sec = secI > 9 ? secI + "" : "0" + secI;
		return year + month + day + hour + min + sec;
	}
	/**
	 * 随即年月日，范围1900-1999年之间
	 * @return
	 */
	public static String CreateSimpleDateTimeString() {
		int year = 1900 + r.nextInt(100);
		int monthI = r.nextInt(12) + 1;
		String month = monthI > 9 ? monthI + "" : "0" + monthI;
		int dayI = r.nextInt(28) + 1;
		String day = dayI > 9 ? dayI + "" : "0" + dayI;
		return year + month + day;
	}
}
